pkgname=testapp
pkgver=1.0
pkgrel=0
pkgdesc="program using the testlib (for testing soname bumps)"
url="https://postmarketos.org"
arch="all"
license="MIT"
depends="testlib"
makedepends=""
subpackages=""
source="testapp.c"
options=""

build() {
	cd "$srcdir"
	$CC testapp.c -o testapp -L/usr/lib/ -ltestlib
}

check() {
	cd "$srcdir"
	printf 'hello, world from testlib!\n' > expected
	./testapp > real
	diff -q expected real
}

package() {
	install -Dm755 "$srcdir/testapp" "$pkgdir/usr/bin/testapp"
}
sha512sums="73b167575dc0082a1277b0430f095509885c7aaf55e59bad148825a9879f91fe41c6479bb7f34c0cdd15284b0aadd904a5ba2c1ea85fb8bfb061e1cbf4322d76  testapp.c"
